package com.iwinding.ladygg.modle.bean;

/**
 * Created by 82218 on 2017/7/10.
 */

public interface ErrorCode {
    //error about oauth2
    int UNKNOWN_ACCESS_TOKEN = 1000;
    String UNKNOWN_ACCESS_TOKEN_MSG = "访问令牌不存在或已过期, 请重新获取";
    int UNSUPPORTED_GRANT_TYPE = 1001;
    String UNSUPPORTED_GRANT_TYPE_MSG = "不支持该授权类型";
    String UNSUPPORTED_RESPONSE_TYPE_MSG = "不支持该授权类型, 请使用授权码方式";
    //error about client
    int UNKNOWN_OAUTH_CLIENT  = 1010;
    String UNKNOWN_OAUTH_CLIENT_MSG = "该客户端不存在";
    int UNAUTHORIZED_OAUTH_CLIENT = 1011;
    String UNAUTHORIZED_OAUTH_CLIENT_MSG = "未授权的客户端, 请先获取正确的授权码";
    int INVALID_OAUTH_CLIENT = 1012;
    String INVALID_OAUTH_CLIENT_MSG = "客户端验证失败, 无效的client ID或client secret";
    //error about http request and json
    int UNKNOWN_USER_AGENT = 1020;
    String UNKNOWN_USER_AGENT_MSG = "Unknown User-Agent, 无效的用户代理";
    int UNSUPPORTED_REQUEST_METHOD = 1021;
    String UNSUPPORTED_REQUEST_METHOD_MSG = "http请求方法错误, 请确认请求方法是POST或GET";
    int INVALID_JSON_PARAMETER  = 1022;
    String INVALID_JSON_PARAMETER_MSG  = "参数有效性验证失败, 解析JSON参数出错";
    int IVALID_PARAMETER  = 1023;
    String IVALID_PARAMETER_MSG  = "必要参数不能为空, 或必要参数有效性验证失败";
    //error about session
    int UNKNOWN_SESSION = 1030;
    String UNKNOWN_SESSION_MSG  = "会话不存在或已过期";
    int UNKNOWN_USER_SESSION = 1031;
    String UNKNOWN_USER_SESSION_MSG = "用户账号未登陆或用户会话已过期";
}
